matrix gWVP;
matrix gWorld;
matrix gViewProj;
texture gTex0;

sampler tex0Sampler = sampler_state
{
	Texture = <gTex0>;
	MinFilter = LINEAR;
	MipFilter = LINEAR;
	MagFilter = LINEAR;
};

struct Output
{
	float4 posH		:	POSITION0;
	float2 tex		:	TEXCOORD0;
	float3 normal	:	TEXCOORD1;
};

Output ModelVS( float3 posL : POSITION0, float3 normal : NORMAL0,float2 tex : TEXCOORD0)
{
	Output outVert = (Output)0;
	outVert.posH = mul( float4( posL, 1.0f ), gWVP );
	outVert.normal = normal;
	outVert.tex = tex;
	return outVert;
}

float4 ModelPS( float2 tex : TEXCOORD0 ) : COLOR0
{
	float4 texColor = tex2D( tex0Sampler, tex );
	return texColor;
}

technique ModelTech
{
	pass P0
	{
		vertexShader = compile vs_2_0 ModelVS();
		pixelShader = compile ps_2_0 ModelPS();
		//FillMode = wireframe;
	}
}










